<%-- 
    Document   : view-kecelakaan-kerja-graph
    Created on : 14 Sep 11, 10:11:49
    Author     : Bayu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
         <jsp:include page="includes/script.html"/>
        <title>Average Moulding</title>
        <link href="css/init.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <center>
         <form method="get">


          <select name="year">
                          <c:forEach var="i" begin="${minYear}" end="${maxYear}">
                               <c:choose>
                                <c:when test="${currentYear == i}">
                                    <c:set var="select" value="selected"></c:set>
                                </c:when>
                                <c:otherwise>
                                    <c:set var="select" value=""></c:set>
                                </c:otherwise>
                               </c:choose>
                              <option value="${i}" ${select}>${i}</option>
                          </c:forEach>
                        </select>
               <input  type="submit" name="submit" value="View" >

        </form>
         </center>
        <br>
        <center><a href="kecelakaan-kerja-graph.png"><img src="kecelakaan-kerja-graph.png" width="800" border="0"></a></center>
        <br>
        <table align="center">
            <tr>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center"><fmt:formatDate pattern="MMM" value="${data.month}" /></td>
                </c:forEach>
            </tr>
            <tr>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.total}</td>
                </c:forEach>
            </tr>
        </table>
    </center>
       
    </body>
</html>
